home *** CD-ROM | disk | FTP | other *** search
/ IRIX 6.5 Applications 2004 May / SGI IRIX 6.5 Applications 2004 May.iso / dev / java_dev.idb / usr / java / include / breakpoints.h.z / breakpoints.h
Encoding:
C/C++ Source or Header  |  2000-05-20  |  2.7 KB  |  90 lines

  1. /*
  2.  * @(#)breakpoints.h    1.3 98/07/01
  3.  *
  4.  * Copyright 1995-1998 by Sun Microsystems, Inc.,
  5.  * 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
  6.  * All rights reserved.
  7.  * 
  8.  * This software is the confidential and proprietary information
  9.  * of Sun Microsystems, Inc. ("Confidential Information").  You
  10.  * shall not disclose such Confidential Information and shall use
  11.  * it only in accordance with the terms of the license agreement
  12.  * you entered into with Sun.
  13.  */
  14.  
  15. /*
  16.  * Definitions for the breakpoints, single-step and debugger events
  17.  */
  18.  
  19. #ifndef _BREAKPOINTS_H_
  20. #define _BREAKPOINTS_H_
  21.  
  22. #include <stdio.h>
  23. #include <stdlib.h>
  24.  
  25. #include "bool.h"
  26. #include "jni.h"
  27. #include "interpreter.h"
  28. #include "threads.h"
  29.  
  30. /*
  31.  * This section for general use
  32.  */
  33.  
  34. extern int get_opcode(ExecEnv *ee, unsigned char *pc);
  35.  
  36. /*
  37.  * This section for use by a debugger 
  38.  */
  39.  
  40. #ifdef BREAKPTS
  41.  
  42. /* Typedefs for debugger-notification hooks */
  43. typedef void (*HandleSingleStepHook)(ExecEnv *ee, unsigned char *pc);
  44. typedef void (*HandleBreakpointHook)(ExecEnv *ee, unsigned char *pc);
  45. typedef void (*HandleExceptionHook)(ExecEnv *ee, unsigned char *pc,
  46.                 HObject *object);
  47. typedef void (*HandleThreadCreateHook)(ExecEnv *, Hjava_lang_Thread *);
  48. typedef void (*HandleThreadExitHook)(ExecEnv *, Hjava_lang_Thread *,
  49.                      Hjava_lang_ThreadGroup *);
  50.  
  51. JNIEXPORT void JNICALL
  52. set_debugger_hooks(HandleSingleStepHook hssh,
  53.            HandleBreakpointHook hbh,
  54.            HandleExceptionHook heh);
  55.  
  56. JNIEXPORT void JNICALL
  57. set_debugger_hooks_sgi(HandleSingleStepHook hssh,
  58.                HandleBreakpointHook hbh,
  59.                HandleExceptionHook heh,
  60.                HandleThreadCreateHook htch,
  61.                HandleThreadExitHook hteh);
  62.  
  63. extern void set_single_step_thread(TID tid, bool_t shouldStep);
  64. extern bool_t set_breakpoint(ExecEnv *ee, unsigned char *pc);
  65. extern bool_t clear_breakpoint(ExecEnv *ee, unsigned char *pc);
  66. extern void clear_all_breakpoints(ExecEnv *ee);
  67.  
  68. extern bool_t JDB_loadclass_locked(ExecEnv *ee);
  69. extern HArrayOfObject *get_linked_classes();
  70.  
  71. #endif /* BREAKPTS */
  72.  
  73. /*
  74.  * This section for use by the interpreter
  75.  */
  76. extern void notify_debugger_of_exception(unsigned char *pc, ExecEnv *ee, HObject *object);
  77. extern void notify_debugger_of_single_step(unsigned char *pc, ExecEnv *ee);
  78. extern void notify_debugger_of_thread_create(ExecEnv *, Hjava_lang_Thread *);
  79. extern void notify_debugger_of_thread_exit(ExecEnv *, Hjava_lang_Thread *,
  80.                        Hjava_lang_ThreadGroup *);
  81.  
  82. #ifdef BREAKPTS
  83. extern bool_t single_stepping; /* set ONLY by breakpoints.c */
  84. extern int get_breakpoint_opcode(ExecEnv *ee, unsigned char *pc, bool_t notify);
  85. extern bool_t set_breakpoint_opcode(ExecEnv *ee, unsigned char *pc, unsigned char opcode);
  86. #endif /* BREAKPTS */
  87.  
  88.  
  89. #endif /* _BREAKPOINTS_H_ */
  90.